<?php
namespace Product\Model;

use Zend\InputFilter\Factory as InputFactory;     // <-- Add this import
use Zend\InputFilter\InputFilter;                 // <-- Add this import
use Zend\InputFilter\InputFilterAwareInterface;   // <-- Add this import
use Zend\InputFilter\InputFilterInterface;        // <-- Add this import

class Category 
{
    public $id;
    public $name;
    public $item_id;
	public $productcategory_id;
	

    public function exchangeArray($data)
    {
        $this->id = (isset($data['id'])) ? $data['id'] : null;
        $this->name = (isset($data['name'])) ? $data['name'] : null;
        $this->item_id = (isset($data['item_id'])) ? $data['item_id'] : null;
        $this->productcategory_id = (isset($data['productcategory_id'])) ? $data['productcategory_id'] : null;
    }
	
	public function __construct(array $options = null) {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }
	
	public function getArrayCopy()
     {
         return get_object_vars($this);
     }
	
	protected $inputFilter; 
    
    public function setInputFilter(InputFilterInterface $inputFilter) 
    { 
        throw new \Exception("Not used"); 
    } 
    
    public function getInputFilter() 
    { 
        if (!$this->inputFilter) 
        { 
            $inputFilter = new InputFilter(); 
            $factory = new InputFactory(); 
            
        
        $inputFilter->add($factory->createInput(array(
            'name' => 'name', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
           
        ))); 
 
        /*$inputFilter->add($factory->createInput(array(
            'name' => 'item_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
                
        $inputFilter->add($factory->createInput(array(
            'name' => 'productcategory_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); */
       
        $this->inputFilter = $inputFilter;
        }

        return $this->inputFilter;
    }
        
    
}